\doxysection{GMesh Class Reference}
\hypertarget{class_g_mesh}{}\label{class_g_mesh}\index{GMesh@{GMesh}}


Gmsh类是用来提取\+Gmsh网格文件中的网格信息  




{\ttfamily \#include $<$GMesh.\+h$>$}

\doxysubsubsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\hyperlink{class_g_mesh_ac69c0f8d1830105d20f647acef2ad8e6}{GMesh}} ()
\begin{DoxyCompactList}\small\item\em 构造函数 \end{DoxyCompactList}\item 
\mbox{\hyperlink{class_g_mesh_a6e42a8e60cdc354f9a4ab2226e2cf0c2}{\texorpdfstring{$\sim$}{\string~}\+GMesh}} ()
\begin{DoxyCompactList}\small\item\em 析构函数 ~\newline
 \end{DoxyCompactList}\item 
void \mbox{\hyperlink{class_g_mesh_a1e0f8e5639168033d51f43f603364dc0}{get\+Mesh}} (std\+::string filename)
\begin{DoxyCompactList}\small\item\em 读取\+Gmsh网格文件 \end{DoxyCompactList}\item 
void \mbox{\hyperlink{class_g_mesh_a63962ef5902d1f7cc5f2264d026d0250}{clear\+Mesh}} ()
\begin{DoxyCompactList}\small\item\em 清除网格信息 ~\newline
 \end{DoxyCompactList}\item 
std\+::vector$<$ std\+::vector$<$ double $>$ $>$ \mbox{\hyperlink{class_g_mesh_a2b855296f6f8192b54f558f231859959}{getcoord}} () const
\begin{DoxyCompactList}\small\item\em 获取网格结点坐标信息 ~\newline
 \end{DoxyCompactList}\item 
std\+::vector$<$ std\+::vector$<$ \mbox{\hyperlink{_g_mesh_8h_a91ad9478d81a7aaf2593e8d9c3d06a14}{uint}} $>$ $>$ \mbox{\hyperlink{class_g_mesh_a501e0df80872490fca6df7d4bce0baf8}{getelement\+\_\+P}} () const
\begin{DoxyCompactList}\small\item\em 获取网格点单元点集信息 ~\newline
 \end{DoxyCompactList}\item 
std\+::vector$<$ std\+::vector$<$ \mbox{\hyperlink{_g_mesh_8h_a91ad9478d81a7aaf2593e8d9c3d06a14}{uint}} $>$ $>$ \mbox{\hyperlink{class_g_mesh_a36d0fa646a9c75171d33c5664241af16}{getelement\+\_\+L}} () const
\begin{DoxyCompactList}\small\item\em 获取网格线单元信息 ~\newline
 \end{DoxyCompactList}\item 
std\+::vector$<$ std\+::vector$<$ \mbox{\hyperlink{_g_mesh_8h_a91ad9478d81a7aaf2593e8d9c3d06a14}{uint}} $>$ $>$ \mbox{\hyperlink{class_g_mesh_afc02f89adbeb110307be27d828a80a11}{getelement\+\_\+S}} () const
\begin{DoxyCompactList}\small\item\em 获取网格面单元信息 ~\newline
 \end{DoxyCompactList}\item 
std\+::vector$<$ std\+::vector$<$ \mbox{\hyperlink{_g_mesh_8h_a91ad9478d81a7aaf2593e8d9c3d06a14}{uint}} $>$ $>$ \mbox{\hyperlink{class_g_mesh_ae946defa2c97c62d091fb464ab27188d}{getelement\+\_\+V}} () const
\begin{DoxyCompactList}\small\item\em 获取网格体单元信息 ~\newline
 \end{DoxyCompactList}\item 
\mbox{\hyperlink{_g_mesh_8h_a91ad9478d81a7aaf2593e8d9c3d06a14}{uint}} \mbox{\hyperlink{class_g_mesh_acd8521215d959cc09c24b6663372c93c}{getnum\+Nodes}} () const
\begin{DoxyCompactList}\small\item\em 获取网格结点数量 ~\newline
 \end{DoxyCompactList}\item 
\mbox{\hyperlink{_g_mesh_8h_a91ad9478d81a7aaf2593e8d9c3d06a14}{uint}} \mbox{\hyperlink{class_g_mesh_ae8843ee00e343c3f78c597d2327282c4}{getnum\+Elements}} () const
\begin{DoxyCompactList}\small\item\em 获取网格单元数量 ~\newline
 \end{DoxyCompactList}\item 
void \mbox{\hyperlink{class_g_mesh_abbfc504f3958c3d39031867fcb756ac4}{setselected\+Nodes}} (std\+::vector$<$ \mbox{\hyperlink{_g_mesh_8h_a91ad9478d81a7aaf2593e8d9c3d06a14}{uint}} $>$ selected\+Nodes)
\begin{DoxyCompactList}\small\item\em 设置选中的结点编号 ~\newline
 \end{DoxyCompactList}\item 
void \mbox{\hyperlink{class_g_mesh_aa1164636732ec92a6ac4acb2de413dd0}{setselected\+Elements}} (std\+::vector$<$ \mbox{\hyperlink{_g_mesh_8h_a91ad9478d81a7aaf2593e8d9c3d06a14}{uint}} $>$ selected\+Elements)
\begin{DoxyCompactList}\small\item\em 设置选中的单元编号 ~\newline
 \end{DoxyCompactList}\item 
std\+::vector$<$ \mbox{\hyperlink{_g_mesh_8h_a91ad9478d81a7aaf2593e8d9c3d06a14}{uint}} $>$ \mbox{\hyperlink{class_g_mesh_a35ed0c043375f23a5e7f661e22ddb5b3}{getselected\+Nodes}} () const
\begin{DoxyCompactList}\small\item\em 获取选中的结点编号 ~\newline
 \end{DoxyCompactList}\item 
std\+::vector$<$ \mbox{\hyperlink{_g_mesh_8h_a91ad9478d81a7aaf2593e8d9c3d06a14}{uint}} $>$ \mbox{\hyperlink{class_g_mesh_a1050100fa0462e18ee65584d6b57e4cf}{getselected\+Elements}} () const
\begin{DoxyCompactList}\small\item\em 获取选中的单元编号 ~\newline
 \end{DoxyCompactList}\end{DoxyCompactItemize}


\doxysubsection{Detailed Description}
Gmsh类是用来提取\+Gmsh网格文件中的网格信息 

提供了读取\+Gmsh网格文件的接口

网格信息包括节点坐标、单元信息、边界信息等

网格文件格式参考：支持二维三角形单元以及三维四面体单元

网格文件格式参考：https\+://gmsh.info/doc/texinfo/gmsh.\+html\#\+MSH-\/file-\/format 

\doxysubsection{Constructor \& Destructor Documentation}
\Hypertarget{class_g_mesh_ac69c0f8d1830105d20f647acef2ad8e6}\label{class_g_mesh_ac69c0f8d1830105d20f647acef2ad8e6} 
\index{GMesh@{GMesh}!GMesh@{GMesh}}
\index{GMesh@{GMesh}!GMesh@{GMesh}}
\doxysubsubsection{\texorpdfstring{GMesh()}{GMesh()}}
{\footnotesize\ttfamily GMesh\+::\+GMesh (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



构造函数 

构造函数，将类成员变量初始化为默认值 \Hypertarget{class_g_mesh_a6e42a8e60cdc354f9a4ab2226e2cf0c2}\label{class_g_mesh_a6e42a8e60cdc354f9a4ab2226e2cf0c2} 
\index{GMesh@{GMesh}!````~GMesh@{\texorpdfstring{$\sim$}{\string~}GMesh}}
\index{````~GMesh@{\texorpdfstring{$\sim$}{\string~}GMesh}!GMesh@{GMesh}}
\doxysubsubsection{\texorpdfstring{\texorpdfstring{$\sim$}{\string~}GMesh()}{\string~GMesh()}}
{\footnotesize\ttfamily GMesh\+::\texorpdfstring{$\sim$}{\string~}\+GMesh (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



析构函数 ~\newline
 

析构函数默认不做任何事情 

\doxysubsection{Member Function Documentation}
\Hypertarget{class_g_mesh_a63962ef5902d1f7cc5f2264d026d0250}\label{class_g_mesh_a63962ef5902d1f7cc5f2264d026d0250} 
\index{GMesh@{GMesh}!clearMesh@{clearMesh}}
\index{clearMesh@{clearMesh}!GMesh@{GMesh}}
\doxysubsubsection{\texorpdfstring{clearMesh()}{clearMesh()}}
{\footnotesize\ttfamily void GMesh\+::clear\+Mesh (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



清除网格信息 ~\newline
 

清除网格信息，将类成员变量初始化为默认值 \Hypertarget{class_g_mesh_a2b855296f6f8192b54f558f231859959}\label{class_g_mesh_a2b855296f6f8192b54f558f231859959} 
\index{GMesh@{GMesh}!getcoord@{getcoord}}
\index{getcoord@{getcoord}!GMesh@{GMesh}}
\doxysubsubsection{\texorpdfstring{getcoord()}{getcoord()}}
{\footnotesize\ttfamily std\+::vector$<$ std\+::vector$<$ double $>$ $>$ GMesh\+::getcoord (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



获取网格结点坐标信息 ~\newline
 

获取结点编号以及对应的坐标信息 \begin{DoxyReturn}{Returns}
二维矩阵，每一行代表一个结点的坐标信息。总列数为4，第1列为结点全局编号，后3列分别为x、y、z坐标 
\end{DoxyReturn}
\Hypertarget{class_g_mesh_a36d0fa646a9c75171d33c5664241af16}\label{class_g_mesh_a36d0fa646a9c75171d33c5664241af16} 
\index{GMesh@{GMesh}!getelement\_L@{getelement\_L}}
\index{getelement\_L@{getelement\_L}!GMesh@{GMesh}}
\doxysubsubsection{\texorpdfstring{getelement\_L()}{getelement\_L()}}
{\footnotesize\ttfamily std\+::vector$<$ std\+::vector$<$ \mbox{\hyperlink{_g_mesh_8h_a91ad9478d81a7aaf2593e8d9c3d06a14}{uint}} $>$ $>$ GMesh\+::getelement\+\_\+L (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



获取网格线单元信息 ~\newline
 

获取网格信息中的线单元编号以及对应的全局结点编号 \begin{DoxyReturn}{Returns}
二维矩阵，每一行代表一个线单元的结点编号。总列数为4，第1列为线集组编号， 第2列为线单元局部编号，第3列到第4列为线单元对应的全局结点编号 
\end{DoxyReturn}
\Hypertarget{class_g_mesh_a501e0df80872490fca6df7d4bce0baf8}\label{class_g_mesh_a501e0df80872490fca6df7d4bce0baf8} 
\index{GMesh@{GMesh}!getelement\_P@{getelement\_P}}
\index{getelement\_P@{getelement\_P}!GMesh@{GMesh}}
\doxysubsubsection{\texorpdfstring{getelement\_P()}{getelement\_P()}}
{\footnotesize\ttfamily std\+::vector$<$ std\+::vector$<$ \mbox{\hyperlink{_g_mesh_8h_a91ad9478d81a7aaf2593e8d9c3d06a14}{uint}} $>$ $>$ GMesh\+::getelement\+\_\+P (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



获取网格点单元点集信息 ~\newline
 

获取网格信息中的点单元编号以及对应的全局结点编号 \begin{DoxyReturn}{Returns}
二维矩阵，每一行代表一个点单元的结点编号。总列数为3，第1列为点集组编号， 第2列为点单元局部编号，第3列为点单元对应的全局编号 
\end{DoxyReturn}
\Hypertarget{class_g_mesh_afc02f89adbeb110307be27d828a80a11}\label{class_g_mesh_afc02f89adbeb110307be27d828a80a11} 
\index{GMesh@{GMesh}!getelement\_S@{getelement\_S}}
\index{getelement\_S@{getelement\_S}!GMesh@{GMesh}}
\doxysubsubsection{\texorpdfstring{getelement\_S()}{getelement\_S()}}
{\footnotesize\ttfamily std\+::vector$<$ std\+::vector$<$ \mbox{\hyperlink{_g_mesh_8h_a91ad9478d81a7aaf2593e8d9c3d06a14}{uint}} $>$ $>$ GMesh\+::getelement\+\_\+S (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



获取网格面单元信息 ~\newline
 

获取网格信息中的面单元编号以及对应的全局结点编号 \begin{DoxyReturn}{Returns}
二维矩阵，每一行代表一个面单元的结点编号。总列数为5，第1列为面集组编号， 第2列为面单元局部编号，第3列到第5列为面单元对应的全局结点编号 
\end{DoxyReturn}
\Hypertarget{class_g_mesh_ae946defa2c97c62d091fb464ab27188d}\label{class_g_mesh_ae946defa2c97c62d091fb464ab27188d} 
\index{GMesh@{GMesh}!getelement\_V@{getelement\_V}}
\index{getelement\_V@{getelement\_V}!GMesh@{GMesh}}
\doxysubsubsection{\texorpdfstring{getelement\_V()}{getelement\_V()}}
{\footnotesize\ttfamily std\+::vector$<$ std\+::vector$<$ \mbox{\hyperlink{_g_mesh_8h_a91ad9478d81a7aaf2593e8d9c3d06a14}{uint}} $>$ $>$ GMesh\+::getelement\+\_\+V (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



获取网格体单元信息 ~\newline
 

获取网格信息中的体单元编号以及对应的全局结点编号 \begin{DoxyReturn}{Returns}
二维矩阵，每一行代表一个体单元的结点编号。总列数为6，第1列为体集组编号， 第2列为体单元局部编号，第3列到第6列为体单元对应的全局结点编号 
\end{DoxyReturn}
\Hypertarget{class_g_mesh_a1e0f8e5639168033d51f43f603364dc0}\label{class_g_mesh_a1e0f8e5639168033d51f43f603364dc0} 
\index{GMesh@{GMesh}!getMesh@{getMesh}}
\index{getMesh@{getMesh}!GMesh@{GMesh}}
\doxysubsubsection{\texorpdfstring{getMesh()}{getMesh()}}
{\footnotesize\ttfamily void GMesh\+::get\+Mesh (\begin{DoxyParamCaption}\item[{std\+::string}]{filename }\end{DoxyParamCaption})}



读取\+Gmsh网格文件 

读取\+Gmsh网格文件，并提取网格信息 
\begin{DoxyParams}{Parameters}
{\em filename} & 网格文件名称 \\
\hline
\end{DoxyParams}
\Hypertarget{class_g_mesh_ae8843ee00e343c3f78c597d2327282c4}\label{class_g_mesh_ae8843ee00e343c3f78c597d2327282c4} 
\index{GMesh@{GMesh}!getnumElements@{getnumElements}}
\index{getnumElements@{getnumElements}!GMesh@{GMesh}}
\doxysubsubsection{\texorpdfstring{getnumElements()}{getnumElements()}}
{\footnotesize\ttfamily \mbox{\hyperlink{_g_mesh_8h_a91ad9478d81a7aaf2593e8d9c3d06a14}{uint}} GMesh\+::getnum\+Elements (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



获取网格单元数量 ~\newline
 

获取网格中单元的数量 \begin{DoxyReturn}{Returns}
单元数量 
\end{DoxyReturn}
\Hypertarget{class_g_mesh_acd8521215d959cc09c24b6663372c93c}\label{class_g_mesh_acd8521215d959cc09c24b6663372c93c} 
\index{GMesh@{GMesh}!getnumNodes@{getnumNodes}}
\index{getnumNodes@{getnumNodes}!GMesh@{GMesh}}
\doxysubsubsection{\texorpdfstring{getnumNodes()}{getnumNodes()}}
{\footnotesize\ttfamily \mbox{\hyperlink{_g_mesh_8h_a91ad9478d81a7aaf2593e8d9c3d06a14}{uint}} GMesh\+::getnum\+Nodes (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



获取网格结点数量 ~\newline
 

获取网格中结点的数量 \begin{DoxyReturn}{Returns}
结点数量 
\end{DoxyReturn}
\Hypertarget{class_g_mesh_a1050100fa0462e18ee65584d6b57e4cf}\label{class_g_mesh_a1050100fa0462e18ee65584d6b57e4cf} 
\index{GMesh@{GMesh}!getselectedElements@{getselectedElements}}
\index{getselectedElements@{getselectedElements}!GMesh@{GMesh}}
\doxysubsubsection{\texorpdfstring{getselectedElements()}{getselectedElements()}}
{\footnotesize\ttfamily std\+::vector$<$ \mbox{\hyperlink{_g_mesh_8h_a91ad9478d81a7aaf2593e8d9c3d06a14}{uint}} $>$ GMesh\+::getselected\+Elements (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



获取选中的单元编号 ~\newline
 

获取选中的单元编号 \begin{DoxyReturn}{Returns}
选中的单元编号 
\end{DoxyReturn}
\Hypertarget{class_g_mesh_a35ed0c043375f23a5e7f661e22ddb5b3}\label{class_g_mesh_a35ed0c043375f23a5e7f661e22ddb5b3} 
\index{GMesh@{GMesh}!getselectedNodes@{getselectedNodes}}
\index{getselectedNodes@{getselectedNodes}!GMesh@{GMesh}}
\doxysubsubsection{\texorpdfstring{getselectedNodes()}{getselectedNodes()}}
{\footnotesize\ttfamily std\+::vector$<$ \mbox{\hyperlink{_g_mesh_8h_a91ad9478d81a7aaf2593e8d9c3d06a14}{uint}} $>$ GMesh\+::getselected\+Nodes (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



获取选中的结点编号 ~\newline
 

获取选中的结点编号 \begin{DoxyReturn}{Returns}
选中的结点编号 
\end{DoxyReturn}
\Hypertarget{class_g_mesh_aa1164636732ec92a6ac4acb2de413dd0}\label{class_g_mesh_aa1164636732ec92a6ac4acb2de413dd0} 
\index{GMesh@{GMesh}!setselectedElements@{setselectedElements}}
\index{setselectedElements@{setselectedElements}!GMesh@{GMesh}}
\doxysubsubsection{\texorpdfstring{setselectedElements()}{setselectedElements()}}
{\footnotesize\ttfamily void GMesh\+::setselected\+Elements (\begin{DoxyParamCaption}\item[{std\+::vector$<$ \mbox{\hyperlink{_g_mesh_8h_a91ad9478d81a7aaf2593e8d9c3d06a14}{uint}} $>$}]{selected\+Elements }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



设置选中的单元编号 ~\newline
 

设置选中的单元编号 \Hypertarget{class_g_mesh_abbfc504f3958c3d39031867fcb756ac4}\label{class_g_mesh_abbfc504f3958c3d39031867fcb756ac4} 
\index{GMesh@{GMesh}!setselectedNodes@{setselectedNodes}}
\index{setselectedNodes@{setselectedNodes}!GMesh@{GMesh}}
\doxysubsubsection{\texorpdfstring{setselectedNodes()}{setselectedNodes()}}
{\footnotesize\ttfamily void GMesh\+::setselected\+Nodes (\begin{DoxyParamCaption}\item[{std\+::vector$<$ \mbox{\hyperlink{_g_mesh_8h_a91ad9478d81a7aaf2593e8d9c3d06a14}{uint}} $>$}]{selected\+Nodes }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



设置选中的结点编号 ~\newline
 

设置选中的结点编号 

The documentation for this class was generated from the following files\+:\begin{DoxyCompactItemize}
\item 
mesh/include/\mbox{\hyperlink{_g_mesh_8h}{GMesh.\+h}}\item 
mesh/GMesh.\+cpp\end{DoxyCompactItemize}
